{% extends 'base.html' %}
 {% block bar %}
      <div class="col-md-9" style=  "justify-content: flex-end;">
            <h1 class="page-header">商品管理页面</h1>
            <div class="panel panel-primary">
                <!-- Default panel contents -->
                <div class="panel-heading">商品列表 <i class="fa fa-thumb-tack pull-right"></i></div>
                <div class="panel-body">
                    <div class="row" style="margin-bottom: 15px">
                        <div class="col-md-4">
                            <div class="input-group">
                                <input type="text" class="form-control" placeholder="Search for...">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button">搜索</button>
                                </span>
                            </div><!-- /input-group -->
                        </div><!-- /.col-md-4 -->
                        <div class="col-md-2 pull-right">
                            <a class="btn btn-success" href="/gold/add_goods">新增商品</a>
                        </div>
                </div>
                </div>
 {% endblock %}
{% block main%}
    <table border="1" class = "table table-hover table-bordered">
       <thead>
    <tr>
        <th>序号</th>
        <th>商品名称</th>
        <th>规格型号</th>
        <th>商品单价</th>
        <th>单位</th>
        <th>备注</th>
        <th>操作</th>

    </tr>
    </thead>
 <tbody>
    {% for goods_obj in goods_list  %}
        <tr>
        <td>{{ forloop.counter }}</td>
        <td>{{ goods_obj.goods_name }}</td>
        <td>{{ goods_obj.goods_type }}</td>
        <td>{{ goods_obj.goods_price }}</td>
        <td>{{ goods_obj.unit }}</td>
        <td>{{ goods_obj.remarks }}</td>
        <td>
             <a href="/gold/update_goods?id={{ goods_obj.id }}">修改</a>
             <a href="/gold/delete_goods?id={{ goods_obj.id }}">删除</a>
            </td>
 </tr>
  {% endfor %}
</tbody>
</table>
{% endblock %}